package Demo01;

import java.util.Scanner;

public class Test {
    public static void main01(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextLine()) { // 注意 while 处理多个 case

            String str = in.nextLine();
            str = func(str);
            System.out.println(str);
        }
    }

    public static void main(String[] args) {
        int[] a = new int[1];
        int[] b  = {1};
        merge(a,0,b,1);

    }
    public static void merge(int A[], int m, int B[], int n) {
        while(n>=1&&m>=1) {
            if(A[m-1]>=B[n-1]) {
                A[m+n-1] = A[m-1];
                m--;
            } else {
                A[m+n-1] = B[n-1];
                n--;
            }
        }
        while(m+n-1>=0&&n>=1) {
            A[m+n-1] = B[n-1];
            n--;
        }

    }
    public static String func(String str) {
        StringBuilder stringBuilder = new StringBuilder();
        boolean[] arr = new boolean[127];
        for (int i = 0; i < str.length(); i++) {
            if(!arr[str.charAt(i)]) {
                stringBuilder.append(str.charAt(i));
                arr[str.charAt(i)] = true;
            }
        }
        return stringBuilder.toString();
    }
}



// 注意类名必须为 Main, 不要有任何 package xxx 信息
class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNextLine()) {
            String string = scanner.nextLine();
            int[][] arrSmall = new int[26][2];
            int[][] arrBig = new int[26][2];
            for (int i = 0; i < string.length(); i++) {
                if (string.charAt(i) >= 'a' && string.charAt(i) <= 'z') {
                    arrSmall[string.charAt(i) - 'a'][0]++;
                }
                if (string.charAt(i) >= 'A' && string.charAt(i) <= 'Z') {
                    arrBig[string.charAt(i) - 'A'][0]++;
                }
            }
            for (int i = 0; i < string.length(); i++) {
                if (string.charAt(i) >= 'a' && string.charAt(i) <= 'z' &&
                        arrSmall[string.charAt(i) - 'a'][1] == 0) {
                    System.out.print(string.charAt(i));
                    arrSmall[string.charAt(i) - 'a'][1]++;
                }
                if (string.charAt(i) >= 'A' && string.charAt(i) <= 'Z' &&
                        arrBig[string.charAt(i) - 'A'][1] == 0) {
                    System.out.print(string.charAt(i));
                    arrBig[string.charAt(i) - 'A'][1]++;
                }
            }
            System.out.println();
        }
    }
}